#include <stdio.h>

int main()
{
	int i = 1;
	int fact = 1;
	int n;
	scanf("%d",&n);
	
	for(i=2;i<=n;i++)
	{
		fact *= i;
	}
	
	printf("%d\n",fact);
	
	return 0;	
}